package com.neighbor.neighborhooduser.service.impl;

import com.neighbor.neighborhooduser.pojo.Users;
import com.neighbor.neighborhooduser.dao.IUsersDao;
import com.neighbor.neighborhooduser.service.IUsersService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户基本信息表 服务实现类
 * </p>
 *
 * @author song
 * @since 2025-09-22 09:13:05
 */
@Service
public class UsersServiceImpl extends ServiceImpl<IUsersDao, Users> implements IUsersService {
    @Override
    public boolean updateUserPassword(Integer userId, String newPassword, String salt) {
        Users user = new Users();
        user.setUserId(userId);
        user.setPassword(newPassword);
        user.setSalt(salt);
        user.setRepwdTimes(1);
        return this.updateById(user);
    }
}
